//
//  USCartoonCharacter.m
//  us
//
//  Created by karry on 2025/4/15.
//

#import "USCartoonCharacter.h"
#import "CharacterView.h"

@implementation USCartoonCharacter

- (UIImage *)snapshotImage{
    return  [CharacterView imageForCharacter:self size:CGSizeMake(100, 100)];
}


+ (USCartoonCharacter *)defaultBoyCharacter{
    
    USCartoonCharacter *model = [USCartoonCharacter new];
    NSMutableArray *parts = [NSMutableArray array];
    NSArray *iconList = @[@"hair_male_1",@"eyes_1",@"mouth_1",@"clothes_1",@"",@""];
    for (int i = 0 ; i<iconList.count; i++) {
        CharacterUnitModel *model = [CharacterUnitModel new];
        model.icon = iconList[i];
        model.type = i;
        [parts addObject:model];
    }
    model.parts = parts;
    return model;
    
}

+ (USCartoonCharacter *)defaultGirlCharacter{
    
    USCartoonCharacter *model = [USCartoonCharacter new];
    
    NSMutableArray *parts = [NSMutableArray array];
    
    NSArray *iconList = @[@"hair_female_1",@"eyes_1",@"mouth_1",@"clothes_1",@"",@""];
    for (int i = 0 ; i<iconList.count; i++) {
        CharacterUnitModel *model = [CharacterUnitModel new];
        model.icon = iconList[i];
        model.type = i;
        [parts addObject:model];
    }
    
    model.parts = parts;
    
    return model;
    
}


@end
